home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1996
/
MacHack 1996.toast
/
Presentations
/
Presentations ’91
/
DAL Files
/
DALtool 4⁄19 (System 6.x)
/
CL1API.H
next >
Wrap
Text File
|
1990-11-12
|
5KB
|
152 lines
/*
CL/1 API include file
Copyright © 1986, 1987, 1989, 1989, 1990 Network Innovations Corporation.
All Rights Reserved.
CL/1 is a trademark of Network Innovations Corporation.
This software may not be used without permission from
Network Innovations Corporation.
*/
/* Client environment - define the correct one to 1, set the rest to 0 */
#define CL1MACDVR 1
#define CL1MSDTSR 0
#define CL1WINDLL 0
#define CL1OS2DLL 0
/* CL/1 API function return values */
#define A_NULL 1 /* null value returned */
#define A_OK 0 /* requested API function completed successfully */
#define A_VALUE 0 /* data value returned */
#define A_ERROR -1 /* execution error occurred */
#define A_READY -2 /* execution completed successfully */
#define A_BADTYPE -3 /* data type mismatch */
#define A_BADCOL -4 /* request for non-existent column */
#define A_BREAK -5 /* user's break function was called and it returned true */
#define A_EXEC -6 /* the host is "busy" executing the requested statements */
#define A_NOTCONN -7 /* a function failed because the connection has not been made */
/* additional return values from CLConInfo */
#define A_SESSMAX -8 /* the specified session id number is too high */
#define A_INUSE -9 /* the session is in use by another (client) program */
#define A_NOHOST -10 /* the session open, but has not connected to a host */
/* CL/1 API data type codes */
#define A_DISCARD -1 /* discard next value */
#define A_NONE 0 /* check status, do not get a value */
#define A_BOOLEAN 1 /* boolean data type */
#define A_SMINT 2 /* short integer data type */
#define A_INTEGER 3 /* long integer data type */
#define A_SMFLOAT 4 /* single-precision f/p data type */
#define A_FLOAT 5 /* double-precision f/p data type */
#define A_DATE 6 /* date data */
#define A_TIME 7 /* time data */
#define A_TIMESTAMP 8 /* date & time data */
#define A_CHAR 9 /* fixed-length character type */
#define A_DECIMAL 10 /* packed decimal data type */
#define A_MONEY 11 /* money data type (packed dec) */
#define A_VCHAR 12 /* variable-length character type */
#define A_VBIN 13 /* variable-length binary type */
#define A_LCHAR 14 /* long text data type */
#define A_LBIN 15 /* long binary data type */
#define A_ANYTYPE 64 /* any type */
/* CL/1 column values */
#define A_NXTCOL -1 /* next column */
/* CL/1 API flags bits */
#define AF_RECEND 1
#define AF_FMTOUT 2
#define AF_ISNULL 4
/* CL/1 wait time values (>= 0 is hundredths of secs) */
#define AW_FOREVER -1
#define AW_DEFAULT -2
/* CL/1 API function prototypes */
#ifdef PROTOTYPE
extern CLInit (long*,char*,char*,char*,char*);
extern CLEnd (long);
extern CLGetErr (long,long*,long*,char*,char*,char*);
extern CLState (long);
extern CLBreak (long,int);
extern CLSend (long,char*,int);
extern CLSendItem (long,int,int,int,int,char*);
extern CLExec (long);
extern CLConInfo (long,int,long*,long*,char*,char*,char*,char*,long*,long*);
extern CLGetSn (long);
extern CLUngetItem (long);
extern CLGetItem (long,int,short*,short*,short*,short*,char*);
extern cl1open (long*);
extern cl1api (struct cl1CB *);
#endif
/* Define the msdos keyword far to nothing for mac and others */
#ifndef far
# if ! CL1MSDTSR && ! CL1WINDLL && ! CL1OS2DLL
# define far /* ! */
# endif
#endif
#ifndef LOCAL
# if CL1OS2DLL
# define LOCAL static
# else
# define LOCAL /* ! */
# endif
#endif
/****************************************************/
/* CL/1 API control block - struct cl1CB */
/* Supplied only for use by the glue source itself, */
/* in order to be able to compile the glue. */
/* Please use CL/1 thru the glue functions only, */
/* and not thru the cl1api () interface. */
/****************************************************/
struct cl1CB {
char far *buffer; /* in : ptr to read/write buffer or 0 */
short retstatus; /* out: return status code */
short colnum; /* internal */
short cl1type; /* in : type expected, out: actual type */
short len; /* in : length of buffer, out: length of data */
short places; /* out: places in packed decimal data */
short flags; /* in/out: data flags */
short request; /* in : function request */
short timeout; /* in : function timeout */
long versid; /* out: version id of CL/1 client */
long sttime; /* out: session ident value */
long sessid; /* in/out: session id */
long sesdat; /* in/out: ptr to session specific data */
long exlon0; /* reserved */
long exinf0; /* reserved */
long exinf1; /* internal */
long exinf2; /* internal */
char far *exinf3; /* internal */
char far *exinf4; /* internal */
char far *exinf5; /* internal */
char far *exinf6; /* internal */
char far *exinf7; /* reserved */
};